/**
 * 
 */
package org.mspring.mlog.service.impl;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.mspring.mlog.dao.LeftMenuDao;
import org.mspring.mlog.entity.SysUser;
import org.mspring.mlog.entity.TreeItem;
import org.mspring.mlog.service.TreeItemService;
import org.mspring.mlog.utils.GlobalUtils;
import org.mspring.platform.core.AbstractServiceSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author fairchildy
 * @since 2012-7-16
 * @Description
 * @TODO
 */
@Service
@Transactional
public class TreeItemServiceImpl extends AbstractServiceSupport implements TreeItemService {

	@Autowired
	private LeftMenuDao leftMenuDao;
    /*
     * (non-Javadoc)
     * 
     * @see org.mspring.mlog.service.TreeItemService#findAllItems()
     */
    @Override
    public List<TreeItem> findAllItems(HttpServletRequest request) {
    	SysUser user = GlobalUtils.getCurrentUser(request);
    	
    	List<TreeItem>  list = leftMenuDao.getFindAllItems(user);
        
        return list;
    }

}
